package top.kuanghua.sms.utils.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.kuanghua.sms.utils.service.SendMsgService;

/**
 * @Title: SmsController @Description: @Auther:
 *
 * @create 2020/8/20 11:33
 */
@RestController
@RequestMapping("sms")
public class SmsController {

  @Autowired private SendMsgService sendMsgService;

  @PostMapping("sendSms")
  public String sendSms(String phone) {
    sendMsgService.sendMsg(phone);
    return "success";
  }
}
